<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>答题闯关王</title>
    <link rel="shortcut icon" href="__STATIC__/favicon.ico"/>
    <link href="__STATIC__/css/index/index.css" type="text/css" rel="stylesheet">
    <link href="__STATIC__/layui/css/layui.css" type="text/css" rel="stylesheet">
	<!--<link href="__STATIC__/bootstrap-3.3.7/css/bootstrap.min.css" type="text/css" rel="stylesheet">-->
	<link href="__STATIC__/bootstrap-3.3.7/css/bootstrap.min.css" type="text/css" rel="stylesheet">
	<script src="__STATIC__/js/jquery-3.3.1.js" type="application/javascript"></script>
	<script src="__STATIC__/layui/layui.all.js" type="application/javascript"></script>
	<style>
		.desktop .order-box table tbody tr td{
			text-align: center;
		}
	</style>
</head>
<body>
	<div class="desktop item-wrapper">
		<div class="desktop-main">
			<div class="order-box">
				<table cellspacing="3" cellpadding="3" ng-show="docArr.length>0">
					<thead>
						<tr>
							<td>id</td>
							<td>openid</td>
							<td>昵称</td>
							<td>头像</td>
							<td>邀请人</td>
							<td>总积分</td>
						</tr>

					</thead>
					<tbody id="order-table" >
					{volist name="res" id="Pmanagement"}
						<tr style="text-align: center">
							<td>{$Pmanagement['id']}</td>
							<td>{$Pmanagement['openid']}</td>
							<td>{$Pmanagement['nickname']}</td>

							<td>
								{if $Pmanagement['H_portrait']}
								<img src="{$Pmanagement['H_portrait']}" width="25" height="25"/>
								{/if}
							</td>
							<td>{$Pmanagement['friend']}</td>
							<td>{$Pmanagement['total_integral']}</td>
						</tr>
					{/volist}
					</tbody>
				</table>
				<div style="text-align: center">
					<div id="test1"></div>
				</div>
			</div>
		</div>
	</div>
    <script src="/static/js/maowenke.js"></script>
    <script>
        layui.use('laypage', function(){
            var laypage = layui.laypage;

            //执行一个laypage实例
            laypage.render({
                elem: 'test1' //注意，这里的 test1 是 ID，不用加 # 号
                ,count: parseInt('{$shu}') //数据总数，从服务端得到
				,jump:function (obj,first) {
					if(!first){
					    $.post("{:url('page/luck')}",{page:obj.curr,limit:10},function (data) {
							$('tbody').empty();
							var str='';
							$.each(data,function (i,v) {
								str+='<tr style="text-align: center">'+
                                '<td>'+tostr(v.id)+'</td>'+
                                '<td>'+tostr(v.openid)+'</td>'+
                                '<td>'+tostr(v.nickname)+'</td>'+
//'<td></td>'+
                                '<td>'+toimages(v.H_portrait,'','25','25')+'</td>'+
                                '<td>'+tostr(v.friend)+'</td>'+
                                '<td>'+tostr(v.total_integral)+'</td>'+
                                '</tr>';
                            })
                            $('tbody').append(str);
                        });
					}
                }
            });
        });
	</script>
</body>
</html>